<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class huongdan extends CI_Controller 
{

	function __construct()
	{
		parent::__construct();
		$this->load->model('huongdan_model','huongdan');
		$this->load->model('home_model','home');
		$this->load->helper('date');
		$this->load->helper('app');
		$this->load->helper('str');
	}
	
	
	function index()
	{
		$data['title'] = "Mua bán rao vặt" ;
		//pagging
		$data['start'] = $start = $this->uri->segment(3) ; 
		$config['base_url'] = base_url().'mua-ban/rao-vat/';  
		$data['num'] = $this->home->count_all();
		$config['total_rows'] = $data['num'];
		$config['per_page'] = 40;
		$config['uri_segment'] = 3;
		$config['num_links'] = 10 ;
		$this->pagination->initialize($config);   
		$data['pagination'] = $this->pagination->create_links();
		//get data
		$data['list'] = $this->home->get_all($config['per_page'], $start);
		
		$data['page'] = 'huongdan' ;
		$this->load->view('html/skin',$data) ;
		//$this->load->view('huongdan',$data) ;
	}
	
}

?>